package com.anhry.www.safety.servlet;


import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

import com.anhry.www.safety.manage.system.service.SystemService;
import com.anhry.www.safety.util.Loggers;
import com.anhry.www.safety.util.Util;

/**
 * @date:2012-5-18
 * @remark:
 * @author:dongbin
 */
public class InitServlet extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	public void init() throws ServletException {
//		ServletContext sc = getServletContext();
//		WebApplicationContext   ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext()); 
//		SystemService systemService=(SystemService)ctx.getBean("systemServiceImpl");  
//
//		try {
		
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
	}
	
	public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {			
		PrintWriter out = response.getWriter();
		ServletContext sc = getServletContext();
		WebApplicationContext   ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(this.getServletContext()); 
		SystemService systemService=(SystemService)ctx.getBean("systemServiceImpl");  
		try {
			Loggers.info("*----------------------------*");
			Loggers.info("*----------------------------*");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
		doGet(request,response);
	}
	
}
